function GetRequest() {
    //获取url中"?"符后的字串  
    var url = location.search;
    var theRequest = new Object();
    if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for (var i = 0; i < strs.length; i++) {
            theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
        }
    }
    return theRequest;
}

var id = GetRequest();
console.log(id);


$.get("http://193.112.55.79:9090/api/getcouponproduct", {
    "couponid": id.prodoct
}, function (ret) {
    console.log(ret);

    // template(模板的id,要渲染的数据)
    var html = template("youhuijuanbb", {
        arr: ret.result
    });
    console.log(html);
    // 渲染
    $(".view").html(html);

    // evnetList();
})